home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 2003 May (DVD) / Macworld Resource DVD May 2003.toast / Data / Software / Bonus / Database / mysql-max-3.23.55.sit / mysql-max-3.23.55-apple-darwi.1 / mysql-test / t / func_math.test < prev    next >
Encoding:
Text File  |  2003-01-21  |  585 b   |  16 lines  |  [TEXT/ttxt]

  1. #
  2. # Test of math functions
  3. #
  4.  
  5. select floor(5.5),floor(-5.5);
  6. select ceiling(5.5),ceiling(-5.5);
  7. select truncate(52.64,1),truncate(52.64,2),truncate(52.64,-1),truncate(52.64,-2), truncate(-52.64,1),truncate(-52.64,-1);
  8. select round(5.5),round(-5.5);
  9. select round(5.64,1),round(5.64,2),round(5.64,-1),round(5.64,-2);
  10. select abs(-10), sign(-5), sign(5), sign(0);
  11. select log(exp(10)),exp(log(sqrt(10))*2);
  12. select pow(10,log10(10)),power(2,4);
  13. select rand(999999),rand();
  14. select pi(),sin(pi()/2),cos(pi()/2),abs(tan(pi())),cot(1),asin(1),acos(0),atan(1);
  15. select degrees(pi()),radians(360);
  16.